<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>首页</title>
</head>

<link rel="stylesheet" type="text/css" href="../static/css/webindex.css" />
<script type="text/javascript" src="../static/js/jquery.js"></script>
<script type="text/javascript" src="../staticjs/jquery.min.js"></script>
<style>
#header {
	height: 55px;
	background: #DCE2F1;
}

.navhead li {
	display: inline;
	float: left;
	position: relative;
	height: 50px;
	line-height: 50px;
	margin: 0 0 0 10px;
	cursor: pointer;
	border-radius: 5px;
}

.navhead li a {
	margin-right: 60px;
	line-height: 40px;
	padding: 0 20px;
	font-size: 16px;
	font-color: #FF0000;
	font-family: "微软雅黑";
	text-align: center;
}

.hright {
	float: right;
	line-height: 55px;
}

.hright a {
	color: #0D0D0D;
	padding: 20px 20px;
}

.bottom {
	text-align: center;
	padding: 20px 20px;
}

#comment {
	background: #DCE2F1;
	width: 350px;
	height: 150px;
	margin: 50px 50px 10px auto;
}
</style>


<body>
	<div class="index">
		<div id="top" class="top">
			<div>
				<div class="hleft">
					<a href=""><img src="/static/image/admin.jpg" width=50px
						height=50px alt="java"></a>
				</div>
				<div id="sysadmin" class="hright">
					<a target="_blank"
						href="${pageContext.request.contextPath}/blogadmin/index"">系统管理</a>
				</div>
			</div>
		</div>
		<div id="header">
			<ul class="navhead" class="pagination">
				<li><a href="#" onclick="openpage('1',1)"><span>Java</span></a></li>
				<li><a href="#" onclick="openpage('2',1)"><span>PHP</span></a></li>
				<li><a href="#" onclick="openpage('3',1)"><span>python</span></a></li>
				<li><a href="#" onclick="openpage('4',1)"><span>PHP</span></a></li>
			</ul>
		</div>

		<div class="center">
			<div id="main" class="left">
				<div class="xnews2">
					<div class="desc">
						<input id="artid" type="hidden" value="${tp.id}">
						<h3>
							<a target="_blank" href="#">${tp.title}</a>
						</h3>
						<div class="time">发布时间:${tp.time}</div>
						<div class="time">
							<a href='#'>${tp.keywords}</a>
						</div>
						<div>${tp.content}</div>
					</div>
				</div>
			</div>
			<div class="right">
				<img src="../static/image/logo.png" width=100% height=500px>
			</div>

			<div>
				<div>
					<textarea id="comment">
				    </textarea>
				</div>
				<div>
					<button id="button">发表评论(200字以内)</button>
				</div>

			</div>
		</div>
		<div class="bottom">Copyright © 2016 - , All Rights Reserved
			Powered By demodashi 1.1.0</div>

	</div>


</body>

<script>
	function openpage(type, page) {
		window.open("${pageContext.request.contextPath}/blogweb/index?type="
				+ type + "&page=" + page, "_self");
	}

	$("#button").click(function() {
		var artid = $("#artid").val();
		var comment = $("#comment").val();
		$.ajax({
			url : "${pageContext.request.contextPath}/comment/savedata",
			data : {
				aid : artid,
				comment : comment
			},
			success : function(data) {
			},
			error : function(data) {
			}

		})

	})
</script>



</html>